<template>
  <div class="item" @click="sendPath">
    <SvgIcon :name="icon" width="50px" height="50px" />
    <div class="right">
      <span class="item__title">{{ title }}</span>
      <p class="item__desc">{{ desc }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps<{ title: string, desc: string, icon: string, path: string }>();
import { useRouter } from 'vue-router';
const router = useRouter();
function sendPath() {
  router.push(props.path);
}
</script>

<style lang="scss" scoped>
.item {
  background-color: #fff;
  display: flex;
  gap: 10px;
  padding: 16px;
  border-radius: 6px;

  .item__title {
    font-size: 24px;
    color: #2C2C2C;
  }

  .item__desc {
    margin-top: 10px;
    color: #2C2C2C;
  }
}
</style>